package entity;

public class ResponseEntity<T> {
    //响应码 200 就是成功  500就是后端有错
    private int code;
    //消息 通常是发给前端，让前端通过弹窗提示出来
    private String msg;
    //封装的对象数据 后台查出来的数据
    private T data;

    public ResponseEntity(int code, String msg, T data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public ResponseEntity() {
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
